package com.mydemo.springlearning.common.conf;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * 增加路径映射
 * @author hd
 * @date 2022/2/9 16:00
 */
@Configuration
public class WebMvcConf implements WebMvcConfigurer {
    @Override
    public void addViewControllers(ViewControllerRegistry registry) {
        registry.addViewController("/file/upload").setViewName("upload/upload-single");
        WebMvcConfigurer.super.addViewControllers(registry);
    }
}
